/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 87111
 * Date: 2025-08-18
 * Time: 19:56
 */

class MyArrays<T> {
    Object[] arr = new Object[5];
    public void setArr(int a, T b) {
        arr[a] = b;
    }
    public T getArr(int a) {
        return (T)arr[a];
    }
}
public class Test02 {
    public static void main2(String[] args) {
        MyArrays myArrays = new MyArrays();
    }
    public static void main1(String[] args) {
        MyArrays<Integer> myArrays = new MyArrays<>();
        myArrays.setArr(1,12);
        int a = myArrays.getArr(1);
        System.out.println(a);

        MyArrays<String> myArrays1 = new MyArrays<>();
        myArrays1.setArr(1,"abc");
        String b = myArrays1.getArr(1);
        System.out.println(b);
    }
}
